//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CCanvasProxy.cpp>
///	@path	~/src/graphics/canvas/
///	@date	2008/04/23
///	@desc	.

#include "config/config.h"

#include "graphics/canvas/CCanvasProxy.h"

namespace xeres {

	IMPL_IOBJECT_CLASS( CCanvasProxy );

	// CCanvasProxy
	CCanvasProxy::CCanvasProxy( function<void(RenderContext&)> call )
		: m_call( call )
	{

	}
	// ~CCanvasProxy
	CCanvasProxy::~CCanvasProxy( void )
	{

	}
	// Initialize
	void CCanvasProxy::Initialize( RefWeak<IRenderer> renderer )
	{

	}
	// Finalize
	void CCanvasProxy::Finalize( void )
	{

	}
	// Render
	void CCanvasProxy::Render( RenderContext& rc )
	{
		if( m_call )
			m_call( rc );
	}
	// SetProxy
	void CCanvasProxy::SetProxy( function<void(RenderContext&)> call )
	{
		m_call = call;
	}

} // namespace xeres